package com.taobao.txc.parser.struct;

import com.alibaba.fastjson.JSON;
import java.util.Date;

public class TxcField
{
  public String name;
  public int type;
  public Object value;
  
  public String a()
  {
    return this.name;
  }
  
  public void a(String paramString)
  {
    this.name = paramString;
  }
  
  public int b()
  {
    return this.type;
  }
  
  public void a(int paramInt)
  {
    this.type = paramInt;
  }
  
  public Object c()
  {
    return this.value;
  }
  
  public void a(Object paramObject)
  {
    this.value = jsonObjectSerialize(paramObject);
  }
  
  public static Object jsonObjectSerialize(Object paramObject)
  {
    if (paramObject == null) {
      return null;
    }
    if (Date.class.isAssignableFrom(paramObject.getClass())) {
      return JSON.toJSONString(paramObject);
    }
    return paramObject;
  }
  
  public boolean b(String paramString)
  {
    return this.name.equalsIgnoreCase(paramString);
  }
  
  public String toString()
  {
    return String.format("[%s,%s]", new Object[] { this.name, String.valueOf(this.value) });
  }
}


/* Location:           C:\Users\ibm\Downloads\txc-yun-sample (1)\txc-yun-sample\lib\txc-client-2.0.72.jar
 * Qualified Name:     com.taobao.txc.parser.struct.TxcField
 * JD-Core Version:    0.7.0.1
 */